/* 免费试算表单样式 - 参考并行科技网站设计 */

/* 模态框容器 */
.trial-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.trial-modal.active {
  display: flex;
}

/* 模态框背景遮罩 */
.trial-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

/* 模态框内容 */
.trial-modal-content {
  position: relative;
  background-color: white;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(1);
  transition: transform 0.3s ease;
}

.trial-modal.active .trial-modal-content {
  animation: trialModalSlideIn 0.4s ease-out;
}

/* 模态框头部 */
.trial-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #f0f0f0;
  background-color: #fafafa;
  border-radius: 12px 12px 0 0;
}

.trial-modal-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

/* 关闭按钮 */
.trial-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trial-modal-close:hover {
  background-color: #f0f0f0;
  color: #666;
}

/* 模态框主体 */
.trial-modal-body {
  padding: 30px;
}

/* 表单容器 */
.trial-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 表单行 - 用于并排元素 */
.trial-form-row {
  display: flex;
  gap: 20px;
}

/* 表单组 */
.trial-form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 表单标签 */
.trial-form-label {
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

/* 必填字段标记 */
.trial-form-label.required::after {
  content: '*';
  color: #e53e3e;
  margin-left: 4px;
}

/* 表单控件 */
.trial-form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: white;
}

.trial-form-control:focus {
  outline: none;
  border-color: var(--primary-color, #1E88E5);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* 文本域 */
.trial-form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* 下拉选择框 */
.trial-form-select {
  cursor: pointer;
}

/* 复选框 */
.trial-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.trial-form-checkbox input[type="checkbox"] {
  margin-top: 4px;
}

.trial-form-checkbox label {
  flex: 1;
  font-size: 0.9rem;
  color: #666;
}

/* 隐私政策链接 */
.privacy-link {
  color: var(--primary-color, #1E88E5);
  text-decoration: none;
}

.privacy-link:hover {
  text-decoration: underline;
}

/* 模态框底部 */
.trial-modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #f0f0f0;
  background-color: #fafafa;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-radius: 0 0 12px 12px;
  align-items: center;
}

/* 按钮样式 */
.trial-form-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

/* 取消按钮样式增强 - 确保样式优先级 */
.trial-form-btn.trial-form-btn-secondary.trial-modal-close {
  background-color: white !important;
  color: #666 !important;
  border: 1px solid #ddd !important;
  height: 44px !important;
  min-width: 80px !important;
  text-align: center !important;
  padding: 0 24px !important;
  line-height: 1.5 !important;
  font-size: 1rem !important;
}

.trial-form-btn-primary {
  background-color: var(--primary-color, #1E88E5);
  color: white;
}

.trial-form-btn-primary:hover {
  background-color: #1565C0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.trial-form-btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.trial-form-btn-secondary {
  background-color: white;
  color: #666;
  border: 1px solid #ddd;
  height: 44px;
  min-width: 80px;
  text-align: center;
}

.trial-form-btn-secondary:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* 错误提示 */
.trial-form-error {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* 表单提示 */
.trial-form-hint {
  color: #666;
  font-size: 0.85rem;
  margin-top: 4px;
}

/* 加载状态 */
.trial-form-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: trialFormSpin 0.8s ease-in-out infinite;
}

/* 成功提示消息 */
.trial-form-success {
  text-align: center;
  padding: 40px 20px;
}

.trial-form-success-icon {
  width: 60px;
  height: 60px;
  background-color: #48BB78;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 2rem;
}

.trial-form-success-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.trial-form-success-message {
  color: #666;
  line-height: 1.6;
}

/* 动画 */
@keyframes trialModalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes trialFormSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .trial-modal {
    padding: 10px;
  }
  
  .trial-modal-content {
    margin: 0;
    max-height: 95vh;
    border-radius: 8px;
  }
  
  .trial-modal-header,
  .trial-modal-body,
  .trial-modal-footer {
    padding: 15px 20px;
  }
  
  .trial-modal-title {
    font-size: 1.25rem;
  }
  
  .trial-form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .trial-modal-footer {
    flex-direction: column;
  }
  
  .trial-form-btn {
    width: 100%;
    padding: 14px 20px;
  }
}